import 'package:flutter/material.dart';
import 'package:homepad/styles.dart';

class HomeWidgetPhoto extends StatelessWidget {
  const HomeWidgetPhoto({super.key});

  @override
  Widget build(BuildContext context) {
    final MyStyles styles = Theme.of(context).extension<MyStyles>()!;

    return Container(
      height: 225,
      width: 470,
      decoration: ShapeDecoration(
        shape: RoundedRectangleBorder(borderRadius: styles.radius),
        image: const DecorationImage(
          fit: BoxFit.fill,
          image: AssetImage("assets/images/bg_home_widget_photo.jpg"),
        ),
      ),
      child: Container(
        color: styles.overlay,
        child: Stack(
          children: [
            Positioned(left: 20, top: 10, child: Text("家庭相册", style: styles.titleStyle.copyWith(shadows: styles.shadows))),
            Positioned(left: 20, bottom: 10, child: Text("大岭山森林公园", style: styles.textStyle.copyWith(
              shadows: styles.shadows,
              fontSize: 16,
            ))),
            const Positioned(right: 10, top: 10, child: Image(
              width: 30,
              height: 30,
              fit: BoxFit.fill,
              image: AssetImage("assets/images/icon_font_livephoto.png"),
            )),
          ],
        ),
      ),
    );
  }
}